﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebeTerm.WebControls;
using WebeTerm.Model;
using WebeTerm.DbBusiness;

namespace WebeTerm.Web.Pages.Configs.TemplateControls
{
    public partial class MyeTermConfigs : ListControlBase
    {
        protected override void LoadData()
        {
            WebeTerm.Common.Pages pages = BuildPages();
            var sql = new ConfigurationInfoBLL().All()
                ;
            pages.RecordSum = sql.Count();
            this.rptConfigs.DataSource = sql.OrderBy(l => l.Id).Take(pages.RecordPaginal).Skip((pages.PageNumber - 1) * pages.RecordPaginal).Distinct().ToList();
            this.rptConfigs.DataBind();
            PageControler.PagesInfo = pages;
        }
    }
}